Toggle Vehicle Activation
PATCH /tms/vehicles/toggle/{vehicleId}
Description
This endpoint allows you to activate or deactivate a vehicle based on the provided vehicleId. This operation will toggle the vehicle's status between active and inactive.
Parameters
- countryCode (
string, header, required): The country code where the vehicle is registered. - tenantId (
string, header, required): The ID of the tenant requesting the operation. - vehicleId (
string, path, required): The ID of the vehicle to be activated or deactivated.
Request Body
- Media Type:
application/json
Example Value
{
"active": true
}
Responses
200 OK Description: Successfully toggled the vehicle's activation status. Media Type: Controls Accept header. Example Value:
{
"status": true,
"statusCode": 0,
"message": "Vehicle status updated successfully",
"data": {},
"errors": []
}
400 Bad Request
Description: Invalid reference supplied.
404 Not Found
Description: Resource not found.
LANGUAGE
CURL REQUEST
curl --request PATCH \
--url /tms/vehicles/toggle/{vehicleId} \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!